{% extends "admin/base_site.html" %}
{% load i18n bootstrapped_goodies_tags %}{% load url from future %}

{% block breadcrumbs %}
<ul class="breadcrumb">
<li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li>{% trans 'Password reset confirmation' %}</li>
</ul>
{% endblock %}

{% block title %}{% trans 'Password reset' %}{% endblock %}
{% block content_title %}<a class="navbar-brand">{% trans 'Password reset' %}</a>{% endblock %}

{% block content %}

{% if validlink %}

<h1>{% trans 'Enter new password' %}</h1>

<p class="alert alert-info">{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>

<form class="form-horizontal" action="" method="post">{% csrf_token %}
<div class="form-group">
    <div class="control-label col-sm-2">
        <label for="id_new_password1">{% trans 'New password:' %}</label>
    </div>
    <div class="controls col-sm-10">
        {% dab_field_rendering form.new_password1 %}
        {% if form.new_password1.errors %}<span class="text-danger">{{ form.new_password1.errors|striptags }}</span>{% endif %}
    </div>
</div>
<div class="form-group">
    <div class="control-label col-sm-2">
        <label for="id_new_password2">{% trans 'Confirm password:' %}</label>
    </div>
    <div class="controls col-sm-10">
        {% dab_field_rendering form.new_password2 %}
        {% if form.new_password2.errors %}<span class="text-danger">{{ form.new_password2.errors|striptags }}</span>{% endif %}
    </div>
</div>
<div class="form-actions col-sm-offset-2 col-sm-10">
    <input type="submit" class="btn btn-primary" value="{% trans 'Change my password' %}" />
</div>
</form>

{% else %}

<h1>{% trans 'Password reset unsuccessful' %}</h1>

<p class="alert alert-warning">{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>

{% endif %}

{% endblock %}
